package com.graducationdesign.springboot.controller.Teacher;

import com.graducationdesign.springboot.entities.Administrator.PersonnalInformationMoudle.Teacher;
import com.graducationdesign.springboot.mapper.AllGraducationDesignMapper;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author Mr.zhneg
 * @create 2020-02-02-23:01
 */
@Controller
public class PersonnalInformationForTeaController {
    org.slf4j.Logger logger=  LoggerFactory.getLogger(getClass());

    @Autowired
    AllGraducationDesignMapper allGraducationDesignMapper;
    @GetMapping("/personinfomation")
    public  String list(Map<String,Object> map, HttpServletRequest request){

        Object name=request.getSession().getAttribute("loginUser");
        logger.info("老师个人信息查看：");
        Teacher teacher=allGraducationDesignMapper.personInformationForTea(name);
        map.put("teacher",teacher);
        return "Teacher/graduationDesignMoudle/personnalinformation";
    }
}
